package com.hyhy.hycloud.commons.support.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashMap;
import java.util.Map;

/**
 * @author lanpengfei
 * @date 2018/11/3
 */
@Data
@ConfigurationProperties(prefix = "scheduler")
public class SchedulerProperties {
    private final Map<String, JobProperties> jobs = new HashMap<>();

    @Data
    public static class JobProperties {
        private boolean active = true;
        private String cron = "0 0/5 * * * ?";
        private String description = "execute job every 5 minutes";
        private final Map<?, ?> jobDataMap = new HashMap<>();
    }
}
